import request from '@/utils/request'

// 获取token
export const loginAPI = (data) => request({
  url: '/sys/login',
  method: 'post',
  data
})

// 获取用户基本信息
export const getInfo = () => request({
  url: '/sys/profile',
  method: 'POST'
})

// 获取员工基本信息(现在获取只是为了获取头像)
export const getUserDetailById = (id) => request({
  url: `/sys/user/${id}`,
  method: 'GET'
})

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
